package cn.dt70.service.impl;

import cn.dt70.dao.aqbBankcard.AqbBankcardMapper;
import cn.dt70.pojo.AqbBankcard;
import cn.dt70.service.AqbBankcardService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service("aqbBankcardService")
public class AqbBankcardServiceImpl implements AqbBankcardService {

    private static final Logger LOGGER = Logger.getLogger(AqbBankcardServiceImpl.class);

    @Resource
    private AqbBankcardMapper aqbBankcardMapper;

    @Override
    public AqbBankcard addCard(AqbBankcard aqbBankcard) {
        int row=0;
        try {
            row=aqbBankcardMapper.saveCard(aqbBankcard);
            if(row!=1){
              LOGGER.debug("aqbBankcardMapper.saveCard 添加失败");
            }else{
              LOGGER.debug("aqbBankcardMapper.saveCard 添加成功");
            }
        } catch (Exception e) {
            LOGGER.debug("aqbBankcardMapper.saveCard 添加异常"+e.getMessage());
        }
        return aqbBankcard;
    }
}
